How to find the first six terms of a sequence